/* Copyright (C) 2005-2013, Unigine Corp. All rights reserved.
 *
 * File:    fragment_base_light.h
 * Desc:    Grass base light shader
 * Version: 1.05
 * Author:  Alexander Zapryagaev <frustum@unigine.com>
 *
 * This file is part of the Unigine engine (http://unigine.com/).
 *
 * Your use and or redistribution of this software in source and / or
 * binary form, with or without modification, is subject to: (i) your
 * ongoing acceptance of and compliance with the terms and conditions of
 * the Unigine License Agreement; and (ii) your inclusion of this notice
 * in any version of this software that you use or redistribute.
 * A copy of the Unigine License Agreement is available by contacting
 * Unigine Corp. at http://unigine.com/
 */

/******************************************************************************\
*
* OpenGL
*
\******************************************************************************/

#ifdef OPENGL
	
	#ifndef FRAGMENT_BASE_LIGHT
		#define FRAGMENT_BASE_LIGHT
		
		uniform sampler2D s_texture_0;
		uniform sampler2D s_texture_1;
		
		uniform half noise_scale;
		
	#else
		
		#include <core/shaders/default/grass/fragment_base_sample.h>
		
		half3 color = diffuse.xyz * s_texcoord_1.xyz;
		
	#endif
	
/******************************************************************************\
*
* Direct3D11
*
\******************************************************************************/

#elif DIRECT3D11
	
	#ifndef FRAGMENT_BASE_LIGHT
		#define FRAGMENT_BASE_LIGHT
		
		Texture2D s_texture_0 : register(t0);
		Texture2D s_texture_1 : register(t1);
		
		cbuffer shader_parameters {
			float noise_scale;
		};
		
	#else
		
		#include <core/shaders/default/grass/fragment_base_sample.h>
		
		half3 color = diffuse.xyz * IN.texcoord_1.xyz;
		
	#endif
	
/******************************************************************************\
*
* Direct3D9
*
\******************************************************************************/

#elif DIRECT3D9
	
	#ifndef FRAGMENT_BASE_LIGHT
		#define FRAGMENT_BASE_LIGHT
		
		half noise_scale;
		
	#else
		
		#include <core/shaders/default/grass/fragment_base_sample.h>
		
		half3 color = diffuse.xyz * IN.texcoord_1.xyz;
		
	#endif
	
/******************************************************************************\
*
* PlayStation3
*
\******************************************************************************/

#elif PLAYSTATION3
	
	#ifndef FRAGMENT_BASE_LIGHT
		#define FRAGMENT_BASE_LIGHT
		
		uniform sampler2D s_texture_0 : TEXUNIT0;
		uniform sampler2D s_texture_1 : TEXUNIT1;
		
		uniform half noise_scale;
		
	#else
		
		#include <core/shaders/default/grass/fragment_base_sample.h>
		
		half3 color = diffuse.xyz * IN.texcoord_1.xyz;
		
	#endif
	
#endif
